home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / tpdb13.arc / DEMO2.PAS < prev    next >
Pascal/Delphi Source File  |  1989-02-13  |  694b  |  33 lines

  1. {$A+,B+,D-,E+,F-,I-,L-,N-,O-,R-,S-,V-}
  2. {$M 16384,0,655360}
  3.  
  4. Program Demo2;
  5.  
  6. Uses Crt,Dos,TPDB;
  7.  
  8. Var
  9.     Total : Real;
  10.  
  11. begin
  12.     DBOpenFile('demo2.dbf');
  13.     GetDBRec(1);
  14.     Display;
  15.     ClrScr;
  16.     Writeln('Summing Number field in 1000 records.');
  17.     Writeln;
  18.     Total := Sum(8);
  19.     Writeln('Total of Number fields is ',Total:10:2);
  20.     Writeln;
  21.     GetDBRec(886);
  22.     Writeln('The string conversion of the number field in');
  23.     Writeln('     record number 886 is ',FieldToStr(8));
  24.     Writeln;
  25.     GetDBRec(1);
  26.     If BOF then Writeln('We are now at the beginning of the file.');
  27.     Writeln;
  28.     GetDBRec(1000);
  29.     If EOF then Writeln('We are now at the end of the file.');
  30.     Writeln;
  31.     Wait;
  32.     CloseDBFile;
  33. end.